package com.adou.d16;

import java.io.File;

public class FileTest4 {
    public static void main(String[] args) {
        File file = new File("D:\\BaiduNetdiskDownload\\黑马2023\\2.阶段二 JavaSE进阶");

        // 一级文件名
        String[] names = file.list();
        for (String name : names) {
            System.out.println(name);
        }

        // 一级文件对象
        File[] files = file.listFiles();
        for (File file1 : files) {
            System.out.println(file1.getAbsoluteFile());
        }




    }
}
